package vue;

import java.util.ArrayList;
import java.util.HashMap;

import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;

import controleur.ActionTemplate;

import model.Cellule;
import model.Coordonnee;

public class MenuTemplate extends JPopupMenu{

	public MenuTemplate(ArrayList<HashMap<Coordonnee, Cellule>> aMap, ArrayList<String> aNom) {
		super();
		for (int i = 0; i < aMap.size(); i++) {
			JMenuItem item = new JMenuItem(aNom.get(i));
			this.add(item);
			item.addActionListener(new ActionTemplate(aMap.get(i)));
		}
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

}
